/*--------------------请求用户信息---------------------*/

export default function getData(callback){
   // 解析query参数
   const resolve= (function() {
      if(IS_DEBUG){
         return {
            userID:1,
            weddingID:1,
            token:`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOjEsImlhdCI6MTY2OTE5NDM4MywiZXhwIjoxNjY5Nzk5MTgzfQ.wWe_37IGIrITrU7Z36PkiMojyioXdy5coud54Efok10`
         }
      }
      let url = window.location.search;
      url = url.substr(1);
      let arr = url.split("&")
      let obj = {};
      for (let item of arr) {
         obj[item.split("=")[0]] = decodeURIComponent(item.split("=")[1]);
      }
      return obj;
   }());
   return requestGet('user',resolve,callback)
}
